<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class ServiceMedia extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //  `service_id` int(11) NOT NULL COMMENT '服务ID',
        //  `media` varchar(255) NOT NULL COMMENT '媒体内容',
        //  `head` tinyint(1) NOT NULL COMMENT '是否为首长图片，否：-1，是：1',
        Schema::dropIfExists('service_media');
        Schema::create('service_media', function (Blueprint $table){
            $table->comment = "服务媒体表";
            $table->increments('id')->comment("ID");

            $table->integer("service_id")->comment("服务ID");
            $table->string('media_link')->comment("素材路径");
            #$table->string("media")->comment("媒体内容");
            #$table->tinyInteger("head")->comment("是否为首长图片");

            $table->integer('create_time')->comment("创建时间");
            $table->integer('update_time')->comment("更新时间");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
